﻿@model pcObjectLibrary.UserObjLibrary
@using (Ajax.BeginForm("Details", "User", new { adminUpdate = true }, new AjaxOptions { HttpMethod = "POST", OnSuccess = "postResponseUpdate" }, new { }))
{
     @Html.HiddenFor(x => x.userId)
    <ul class="commonForm">
        <li>
            @Html.LabelFor(x => x.firstName)
            @Html.TextBoxFor(x => x.firstName)
            @Html.ValidationMessageFor(x => x.firstName)
        </li>
        <li>
            @Html.LabelFor(x => x.lastName)
            @Html.TextBoxFor(x => x.lastName)
            @Html.ValidationMessageFor(x => x.lastName)
        </li>
        <li>
            @Html.LabelFor(x => x.email)
            @Html.TextBoxFor(x => x.email)
            @Html.ValidationMessageFor(x => x.email)
        </li>
        <li>
            @Html.LabelFor(x => x.telephone)
            @Html.TextBoxFor(x => x.telephone)
            @Html.ValidationMessageFor(x => x.telephone)
        </li>
        @*   <li>
            @Html.LabelFor(x => x.password)
            @Html.PasswordFor(x => x.password)
            @Html.ValidationMessageFor(x => x.password)
        </li>*@
      @*  <li>
            @Html.LabelFor(x => x.registrationCode)
            @Html.TextBoxFor(x => x.registrationCode)
            @Html.ValidationMessageFor(x => x.registrationCode)
        </li>*@
     
         <li>
            @Html.LabelFor(x => x.userTypeId)
            @Html.DropDownListFor(x => x.userTypeId, (IEnumerable<SelectListItem>)ViewBag.UserTypes, "--Select--", htmlAttributes: new { })
            @Html.ValidationMessageFor(x => x.userTypeId)
        </li>
        <li>
            @Html.LabelFor(x => x.EmploymentTypeId)
            @Html.DropDownListFor(x => x.EmploymentTypeId, (IEnumerable<SelectListItem>)ViewBag.EmploymentType, "--Select--", htmlAttributes: new { })
            @Html.ValidationMessageFor(x => x.EmploymentTypeId)
        </li>
         <li>
            @Html.LabelFor(x => x.registeredTimeZone)
            @Html.DropDownListFor(x => x.registeredTimeZone, (IEnumerable<SelectListItem>)Model.timezonesList, "--Select--", new { @class = "k-dropdownTimeZones" })
            @Html.ValidationMessageFor(x => x.registeredTimeZone)
        </li>
        <li>
              @Html.Raw(string.Format("last punched in at <strong>{1}</strong> on {0} and punched out at <strong>{2}</strong> ", Model.lastPunch.punchDate.ToLongDateString(),
         Model.lastPunch.punchIn, Model.lastPunch.punchOut))
        </li>
    </ul>
    <input type="submit" value="Update" class="k-button" />
}
<div class="clearFloat"></div>